﻿using System;
using System.ComponentModel.DataAnnotations;
using Data.AggregateRoot;

namespace Data.Entities
{
    /// <summary>
    /// 系统模块
    /// </summary>
    public class SysModule : EntityBase
    {
        /// <summary>
        /// 模块名称
        /// </summary>
        [StringLength(200)]
        [Required]
        public string ModuleName { get; set; }
        /// <summary>
        /// 操作地址
        /// </summary>
        [StringLength(200)]
        [Required]
        public string Url { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(2000)]
        public string Description { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        [StringLength(200)]
        public string Icon { get; set; }
        /// <summary>
        /// 按钮主键
        /// </summary>
        [Required]
        public Guid BtnId { get; set; }=Guid.Empty;
        /// <summary>
        /// 按钮样式
        /// </summary>
        [StringLength(200)]
        public string BtnClass { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 模块等级
        /// </summary>
        public int ModuleLevel { get; set; }
        /// <summary>
        /// 是否需要权限控制
        /// </summary>
        public bool IsAuthorize { get; set; }
        /// <summary>
        /// 父级Id
        /// </summary>
        [Required]
        public Guid ParentId { get; set; }=Guid.Empty;
    }
}